package com.atguigu.exer;

 class MyThead1 extends Thread{
    @Override
    public void run() {
        for (int i = 1; i <101 ; i++) {
            if (i%2 == 0) {
                System.out.println(Thread.currentThread().getName()+i);

            }

        }
    }
}
class MyThead2 extends Thread{
    @Override
    public void run() {
        for (int i = 1; i <101 ; i++) {
            if (i%2 != 0) {
                System.out.println(Thread.currentThread().getName()+i);

            }

        }
    }
}
public class MyThead {

    public static void main(String[] args) {
        MyThead1 t1 = new MyThead1();
        MyThead2 t2 = new MyThead2();
        t1.start();
        t2.start();

    }
}

